﻿using MySqlConnector;
using System.Data;

namespace _15Net8AspNetCore_ORM.Context
{
    public class DapperDBContext
    {
        public IConfiguration _Configuration { get; set; }

        public DapperDBContext(IConfiguration configuration)
        {
            _Configuration = configuration;
        }

        public IDbConnection DbConnection()
        {
            return new MySqlConnection(_Configuration.GetConnectionString("DefaultConnection"));
        }
    }
}
